package com.bigfreakindeals.Widgets;


import com.bigfreakindeals.R;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;


public class AlertManager {

	
	static String[] shareitems = { "e-mail", "facebook", "twitter" };
	
	static int[] shareitemsdrawable = { R.drawable.facebook_icon,R.drawable.twitter_icon, R.drawable.share_email_icon };
	static ArrayAdapter<String> adapter;

	public AlertManager(){
		
	}
	
	public static void alertOK(Context context, String message, String button){
	
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		Log.i("ALERT", "message "+message);
		builder.setMessage(message)
		       .setCancelable(false)
		       .setPositiveButton(button, new DialogInterface.OnClickListener() {
		           public void onClick(DialogInterface dialog, int id) {
		               dialog.dismiss();
		           }
		       });
		AlertDialog alert = builder.create();
		alert.show();
		
	}
	public static void confirmAlert(Context context){
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		builder.setMessage("Are you sure you want to hide the app?")
		       .setCancelable(false)
		       .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
		           public void onClick(DialogInterface dialog, int id) {
		        	   dialog.cancel(); 
		        	   dialog.dismiss();
		           }
		       })
		       .setNegativeButton("No", new DialogInterface.OnClickListener() {
		           public void onClick(DialogInterface dialog, int id) {
		                dialog.cancel();
		           }
		       });
		AlertDialog alert = builder.create();
		alert.show();
		
	}

	
}
